3.2.86 \(\int (a+b \sec (c+d x))^3 \sin ^3(c+d x) \, dx\) [186]

3.2.86.1 Optimal result
3.2.86.2 Mathematica [A] (verified)
3.2.86.3 Rubi [A] (verified)
3.2.86.4 Maple [A] (verified)
3.2.86.5 Fricas [A] (verification not implemented)
3.2.86.6 Sympy [F]
3.2.86.7 Maxima [A] (verification not implemented)
3.2.86.8 Giac [A] (verification not implemented)
3.2.86.9 Mupad [B] (verification not implemented)

3.2.86.1 Optimal result

Integrand size = 21, antiderivative size = 116 \[ \int (a+b \sec (c+d x))^3 \sin ^3(c+d x) \, dx=-\frac {a \left (a^2-3 b^2\right ) \cos (c+d x)}{d}+\frac {3 a^2 b \cos ^2(c+d x)}{2 d}+\frac {a^3 \cos ^3(c+d x)}{3 d}-\frac {b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \sec ^2(c+d x)}{2 d} \]

output
-a*(a^2-3*b^2)*cos(d*x+c)/d+3/2*a^2*b*cos(d*x+c)^2/d+1/3*a^3*cos(d*x+c)^3/ 
d-b*(3*a^2-b^2)*ln(cos(d*x+c))/d+3*a*b^2*sec(d*x+c)/d+1/2*b^3*sec(d*x+c)^2 
/d
 
3.2.86.2 Mathematica [A] (verified)

Time = 0.86 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.88 \[ \int (a+b \sec (c+d x))^3 \sin ^3(c+d x) \, dx=\frac {-9 a \left (a^2-4 b^2\right ) \cos (c+d x)+9 a^2 b \cos (2 (c+d x))+a^3 \cos (3 (c+d x))-36 a^2 b \log (\cos (c+d x))+12 b^3 \log (\cos (c+d x))+36 a b^2 \sec (c+d x)+6 b^3 \sec ^2(c+d x)}{12 d} \]

input
Integrate[(a + b*Sec[c + d*x])^3*Sin[c + d*x]^3,x]
 
output
(-9*a*(a^2 - 4*b^2)*Cos[c + d*x] + 9*a^2*b*Cos[2*(c + d*x)] + a^3*Cos[3*(c 
 + d*x)] - 36*a^2*b*Log[Cos[c + d*x]] + 12*b^3*Log[Cos[c + d*x]] + 36*a*b^ 
2*Sec[c + d*x] + 6*b^3*Sec[c + d*x]^2)/(12*d)
 
3.2.86.3 Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.89, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 4359, 25, 25, 3042, 25, 3200, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sin ^3(c+d x) (a+b \sec (c+d x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \cos \left (c+d x-\frac {\pi }{2}\right )^3 \left (a-b \csc \left (c+d x-\frac {\pi }{2}\right )\right )^3dx\)

\(\Big \downarrow \) 4359

\(\displaystyle \int \tan ^3(c+d x) \left (-(-a \cos (c+d x)-b)^3\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int -(b+a \cos (c+d x))^3 \tan ^3(c+d x)dx\)

\(\Big \downarrow \) 25

\(\displaystyle \int \tan ^3(c+d x) (a \cos (c+d x)+b)^3dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {\left (b-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )^3}{\tan \left (c+d x-\frac {\pi }{2}\right )^3}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\left (b-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )^3}{\tan \left (\frac {1}{2} (2 c-\pi )+d x\right )^3}dx\)

\(\Big \downarrow \) 3200

\(\displaystyle -\frac {\int \frac {(b+a \cos (c+d x))^3 \left (a^2-a^2 \cos ^2(c+d x)\right ) \sec ^3(c+d x)}{a^3}d(a \cos (c+d x))}{d}\)

\(\Big \downarrow \) 522

\(\displaystyle -\frac {\int \left (\frac {b^3 \sec ^3(c+d x)}{a}+3 b^2 \sec ^2(c+d x)+\frac {\left (3 a^2 b-b^3\right ) \sec (c+d x)}{a}-a^2 \cos ^2(c+d x)+a^2 \left (1-\frac {3 b^2}{a^2}\right )-3 a b \cos (c+d x)\right )d(a \cos (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {-\frac {1}{3} a^3 \cos ^3(c+d x)+a \left (a^2-3 b^2\right ) \cos (c+d x)+b \left (3 a^2-b^2\right ) \log (a \cos (c+d x))-\frac {3}{2} a^2 b \cos ^2(c+d x)-3 a b^2 \sec (c+d x)-\frac {1}{2} b^3 \sec ^2(c+d x)}{d}\)

input
Int[(a + b*Sec[c + d*x])^3*Sin[c + d*x]^3,x]
 
output
-((a*(a^2 - 3*b^2)*Cos[c + d*x] - (3*a^2*b*Cos[c + d*x]^2)/2 - (a^3*Cos[c 
+ d*x]^3)/3 + b*(3*a^2 - b^2)*Log[a*Cos[c + d*x]] - 3*a*b^2*Sec[c + d*x] - 
 (b^3*Sec[c + d*x]^2)/2)/d)
 

3.2.86.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3200
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p 
_.), x_Symbol] :> Simp[1/f   Subst[Int[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1) 
/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b 
^2, 0] && IntegerQ[(p + 1)/2]
 

rule 4359
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m 
_.), x_Symbol] :> Int[Cot[e + f*x]^p*(b + a*Sin[e + f*x])^m, x] /; FreeQ[{a 
, b, e, f, p}, x] && IntegerQ[m] && EqQ[m, p]
 
3.2.86.4 Maple [A] (verified)

Time = 2.53 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00

method result size
derivativedivides \(\frac {-\frac {a^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}+3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )+b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(116\)
default \(\frac {-\frac {a^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}+3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )+b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(116\)
parts \(-\frac {a^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3 d}+\frac {b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )}{d}+\frac {3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(124\)
parallelrisch \(\frac {72 \left (1+\cos \left (2 d x +2 c \right )\right ) b \left (a^{2}-\frac {b^{2}}{3}\right ) \ln \left (\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )-72 \left (1+\cos \left (2 d x +2 c \right )\right ) b \left (a^{2}-\frac {b^{2}}{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-72 \left (1+\cos \left (2 d x +2 c \right )\right ) b \left (a^{2}-\frac {b^{2}}{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-16 a^{3}+144 a \,b^{2}-12 b^{3}\right ) \cos \left (2 d x +2 c \right )+\left (-7 a^{3}+36 a \,b^{2}\right ) \cos \left (3 d x +3 c \right )+9 \cos \left (4 d x +4 c \right ) a^{2} b +a^{3} \cos \left (5 d x +5 c \right )+\left (-26 a^{3}+252 a \,b^{2}\right ) \cos \left (d x +c \right )-16 a^{3}-9 a^{2} b +144 a \,b^{2}+12 b^{3}}{24 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) \(243\)
risch \(3 i a^{2} b x +\frac {6 i b \,a^{2} c}{d}+\frac {{\mathrm e}^{3 i \left (d x +c \right )} a^{3}}{24 d}+\frac {3 \,{\mathrm e}^{2 i \left (d x +c \right )} a^{2} b}{8 d}-\frac {3 a^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {3 \,{\mathrm e}^{i \left (d x +c \right )} a \,b^{2}}{2 d}-\frac {3 a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )} a \,b^{2}}{2 d}+\frac {3 \,{\mathrm e}^{-2 i \left (d x +c \right )} a^{2} b}{8 d}+\frac {{\mathrm e}^{-3 i \left (d x +c \right )} a^{3}}{24 d}-i b^{3} x -\frac {2 i b^{3} c}{d}+\frac {2 b^{2} \left (3 a \,{\mathrm e}^{3 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 \,{\mathrm e}^{i \left (d x +c \right )} a \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {3 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(275\)
norman \(\frac {-\frac {4 a^{3}-36 a \,b^{2}}{3 d}-\frac {\left (6 a^{2} b -2 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}-\frac {2 \left (2 a^{3}-3 a^{2} b +6 a \,b^{2}-3 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}-\frac {\left (4 a^{3}+18 a^{2} b -36 a \,b^{2}-6 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3 d}+\frac {2 \left (10 a^{3}+9 a^{2} b -18 a \,b^{2}+9 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3 d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}+\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{d}-\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(284\)

input
int((a+b*sec(d*x+c))^3*sin(d*x+c)^3,x,method=_RETURNVERBOSE)
 
output
1/d*(-1/3*a^3*(2+sin(d*x+c)^2)*cos(d*x+c)+3*a^2*b*(-1/2*sin(d*x+c)^2-ln(co 
s(d*x+c)))+3*a*b^2*(sin(d*x+c)^4/cos(d*x+c)+(2+sin(d*x+c)^2)*cos(d*x+c))+b 
^3*(1/2*tan(d*x+c)^2+ln(cos(d*x+c))))
 
3.2.86.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.06 \[ \int (a+b \sec (c+d x))^3 \sin ^3(c+d x) \, dx=\frac {4 \, a^{3} \cos \left (d x + c\right )^{5} + 18 \, a^{2} b \cos \left (d x + c\right )^{4} - 9 \, a^{2} b \cos \left (d x + c\right )^{2} + 36 \, a b^{2} \cos \left (d x + c\right ) - 12 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - 12 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + 6 \, b^{3}}{12 \, d \cos \left (d x + c\right )^{2}} \]

input
integrate((a+b*sec(d*x+c))^3*sin(d*x+c)^3,x, algorithm="fricas")
 
output
1/12*(4*a^3*cos(d*x + c)^5 + 18*a^2*b*cos(d*x + c)^4 - 9*a^2*b*cos(d*x + c 
)^2 + 36*a*b^2*cos(d*x + c) - 12*(a^3 - 3*a*b^2)*cos(d*x + c)^3 - 12*(3*a^ 
2*b - b^3)*cos(d*x + c)^2*log(-cos(d*x + c)) + 6*b^3)/(d*cos(d*x + c)^2)
 
3.2.86.6 Sympy [F]

\[ \int (a+b \sec (c+d x))^3 \sin ^3(c+d x) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sin ^{3}{\left (c + d x \right )}\, dx \]

input
integrate((a+b*sec(d*x+c))**3*sin(d*x+c)**3,x)
 
output
Integral((a + b*sec(c + d*x))**3*sin(c + d*x)**3, x)
 
3.2.86.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.84 \[ \int (a+b \sec (c+d x))^3 \sin ^3(c+d x) \, dx=\frac {2 \, a^{3} \cos \left (d x + c\right )^{3} + 9 \, a^{2} b \cos \left (d x + c\right )^{2} - 6 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right ) - 6 \, {\left (3 \, a^{2} b - b^{3}\right )} \log \left (\cos \left (d x + c\right )\right ) + \frac {3 \, {\left (6 \, a b^{2} \cos \left (d x + c\right ) + b^{3}\right )}}{\cos \left (d x + c\right )^{2}}}{6 \, d} \]

input
integrate((a+b*sec(d*x+c))^3*sin(d*x+c)^3,x, algorithm="maxima")
 
output
1/6*(2*a^3*cos(d*x + c)^3 + 9*a^2*b*cos(d*x + c)^2 - 6*(a^3 - 3*a*b^2)*cos 
(d*x + c) - 6*(3*a^2*b - b^3)*log(cos(d*x + c)) + 3*(6*a*b^2*cos(d*x + c) 
+ b^3)/cos(d*x + c)^2)/d
 
3.2.86.8 Giac [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.10 \[ \int (a+b \sec (c+d x))^3 \sin ^3(c+d x) \, dx=-\frac {{\left (3 \, a^{2} b - b^{3}\right )} \log \left (\frac {{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac {6 \, a b^{2} \cos \left (d x + c\right ) + b^{3}}{2 \, d \cos \left (d x + c\right )^{2}} + \frac {2 \, a^{3} d^{8} \cos \left (d x + c\right )^{3} + 9 \, a^{2} b d^{8} \cos \left (d x + c\right )^{2} - 6 \, a^{3} d^{8} \cos \left (d x + c\right ) + 18 \, a b^{2} d^{8} \cos \left (d x + c\right )}{6 \, d^{9}} \]

input
integrate((a+b*sec(d*x+c))^3*sin(d*x+c)^3,x, algorithm="giac")
 
output
-(3*a^2*b - b^3)*log(abs(cos(d*x + c))/abs(d))/d + 1/2*(6*a*b^2*cos(d*x + 
c) + b^3)/(d*cos(d*x + c)^2) + 1/6*(2*a^3*d^8*cos(d*x + c)^3 + 9*a^2*b*d^8 
*cos(d*x + c)^2 - 6*a^3*d^8*cos(d*x + c) + 18*a*b^2*d^8*cos(d*x + c))/d^9
 
3.2.86.9 Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.85 \[ \int (a+b \sec (c+d x))^3 \sin ^3(c+d x) \, dx=\frac {\frac {\frac {b^3}{2}+3\,a\,\cos \left (c+d\,x\right )\,b^2}{{\cos \left (c+d\,x\right )}^2}-\ln \left (\cos \left (c+d\,x\right )\right )\,\left (3\,a^2\,b-b^3\right )+\cos \left (c+d\,x\right )\,\left (3\,a\,b^2-a^3\right )+\frac {a^3\,{\cos \left (c+d\,x\right )}^3}{3}+\frac {3\,a^2\,b\,{\cos \left (c+d\,x\right )}^2}{2}}{d} \]

input
int(sin(c + d*x)^3*(a + b/cos(c + d*x))^3,x)
 
output
((b^3/2 + 3*a*b^2*cos(c + d*x))/cos(c + d*x)^2 - log(cos(c + d*x))*(3*a^2* 
b - b^3) + cos(c + d*x)*(3*a*b^2 - a^3) + (a^3*cos(c + d*x)^3)/3 + (3*a^2* 
b*cos(c + d*x)^2)/2)/d